<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form id="uploadform" action="doUploadFile.do" encType="multipart/form-data" method="post">
		<input type="file" name="pic">
		<input id="submitbtn" type="button" value="提交">
	</form>
</body>
<%@include file="/WEB-INF/jsp/common/script.jsp" %>
<script src="${APP_PATH}/script/docs.min.js"></script>
<script src="${APP_PATH}/js/layer/layer.js"></script>
<script type="text/javascript">
	$("#submitbtn").click(function(){
		//alert("black");
		$("#uploadform").ajaxSubmit({
			beforeSubmit : function(){
    			return true;
    		},
    		success : function(r) {
    			if ( r.success ) {
    				alert("black");
	    			layer.confirm("公告发布成功,是否继续发布",  {icon: 3, title:'提示'}, function(cindex){
	    				layer.close(cindex);
	    			}, function(cindex){
	    				window.location.href = "${APP_PATH}/notice/list.htm";
	    			    layer.close(cindex);
	    			});
    			} else {
		    		layer.msg("公告发布失败", {time:2000, icon:5, shift:6});
    			}
    		}
    	
		});
	});
</script>
</html>